//
//  CAnAlgRealMeasure+Desc.m
//  CareRing
//
//  Created  on 2025/1/8.
//
    

#import "CAnAlgRealMeasure+Desc.h"
#import "ConfigModel.h"
@implementation CAnAlgRealMeasure (Desc)

-(NSString *)wholeDesc
{
    NSMutableString *infoString = [NSMutableString new];
    [infoString appendFormat:@"Spo2:%@, ", self.spo2];
    
    [infoString appendFormat:@"Hr:%@, ", self.heartRate];
    [infoString appendFormat:@"HRV:%@, ", self.hrv];

    [infoString appendFormat:@"Status:%@, ", self.statusDesc];

    [infoString appendFormat:@"Motion:%u, ", self.motion];

    [infoString appendFormat:@"Hr Quality:%u, ", self.hrQualityIndexValue];

    [infoString appendFormat:@"RespirationRate:%@, ", self.respirationRate];

    [infoString appendFormat:@"IBI:%@, ", self.ibi];

    [infoString appendFormat:@"Stress:%@, ", self.stress];

    [infoString appendFormat:@"CardiacCoherence:%@, ", self.cardiacCoherence];

    [infoString appendFormat:@"Spo2 R:%.2f, ", self.spo2RValue];

    return infoString;
    
}

-(NSString *)statusDesc {
    NSString *str = @"";
    switch (self.dataStatus) {
        case REALTIME_STATUS_NO_MEASURE:
        {
            str = @"Measurement not started";
        }
            break;
        case REALTIME_STATUS_MEASURING:
        {
            str = @"Measuring";
        }
            break;
        case REALTIME_STATUS_DATA_USEFUL:
        {
            str = @"Measurement data valid";
        }
            break;
        default:
            break;
    }
    return str;
}

@end
